//
//  FirstViewController.m
//  Demo
//
//  Created by Echo on 13-9-24.
//

#import "GameViewController.h"

@interface GameViewController ()

@end

@implementation GameViewController
@synthesize type;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    self.title = STR(@"游戏");
    
    [super viewDidLoad];
    
    UIImage *image = IMG(@"game_logo.png");
    UIImageView *logo = [[UIImageView alloc] init];
    [self.view addSubview:logo];

    if (type == 1) {
        self.title = STR(@"新闻");
        image = IMG(@"news_logo.png");
    }else if (type == 2) {
        self.title = STR(@"生活服务");
        image = IMG(@"live_logo.png");
    }
    logo.image = image;
    logo.frame = CGRectMake(10, 10, image.size.width/2, image.size.height/2);
    
    UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(logo.frame.origin.x+logo.frame.size.width+5, logo.frame.origin.y+logo.frame.size.height, 210, 4)];
    imageview.image = IMG(@"game_line.png");
    [self.view addSubview:imageview];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
